import request from '@/utils/request'

// 查询火车座位列表
export function listTrainSeat(query) {
  return request({
    url: '/base/train-seat/list',
    method: 'get',
    params: query
  })
}

// 查询火车座位详细
export function getTrainSeat(id) {
  return request({
    url: '/base/train-seat/' + id,
    method: 'get'
  })
}

// 新增火车座位
export function addTrainSeat(data) {
  return request({
    url: '/base/train-seat',
    method: 'post',
    data: data
  })
}

// 修改火车座位
export function updateTrainSeat(data) {
  return request({
    url: '/base/train-seat',
    method: 'put',
    data: data
  })
}

// 删除火车座位
export function delTrainSeat(id) {
  return request({
    url: '/base/train-seat/' + id,
    method: 'delete'
  })
}

// 查询分组后的火车座位列表
export function listTrainSeatGroup(query) {
  return request({
    url: '/base/train-seat/groupList',
    method: 'get',
    params: query
  })
}

// 清空火车座位数据
export function clearTrainSeat(data) {
  return request({
    url: '/base/train-seat/clear',
    method: 'post',
    data: data
  })
}
